<?php
/**
 * User:chendenan
 * Created On 2022/3/15 0015 21:37
 */
namespace app\api\controller;

class Logout  extends AuthBase {
    public function index(){
        //删除redis token缓存
        $res = cache(config("redis.token_pre").$this->accessToken,NULL);
        if($res){
            return show("退出登录成功",config("status.success"));
        }
        return show("退出登陆失败",config("status.error"));
    }
}